// 头部安全区判断

export const statusBarHeight = () => {
  const ua = window.navigator.userAgent.toLocaleLowerCase();
  const patternHeight = /headerviewheight=(\d+)/;
  let statusHeight = "20px";
  if (patternHeight.test(ua)) {
    statusHeight = patternHeight.exec(ua)[1] + "px";
  }
  console.log("statusHeight", statusHeight);
  return statusHeight;
};

export const headerHeight = () => {
  const statusHeight = statusBarHeight();
  return parseInt(statusHeight) + 44 + "px";
};
